<template>
  <div class="home-banner">
    <!-- 轮播图 -->
    <XtxCarousel :sliders="sliders" autoPlay />
  </div>
</template>
<script lang="ts" setup>
import { findBanner } from '../../api/home'
import { ref } from 'vue';
// 存储轮播图
const sliders = ref([])
// 发起拿到轮播图的数据
findBanner().then((data: any) => {
  sliders.value = data.result
})
</script>
<style  lang="less" scoped>
.home-banner {
  position: absolute;
  left: 0;
  top: 0;
  width: 1240px;
  height: 500px;
  z-index: 98;
}

.xtx-carousel :deep(.carousel-btn.prev) {
  left: 270px;
}


.xtx-carousel :deep(.carousel-indicator) {
  padding-left: 250px;
}
</style>